#from JCUelection.elections.models import Candidate
#from JCUelection.elections.models import Department
#from JCUelection.elections.models import Position
#from JCUelection.elections.models import Election
#from JCUelection.elections.models import Issue
#from JCUelection.elections.models import Choice
#from JCUelection.elections.models import FacultyMember
from JCUelection.elections.models import *
from django.contrib import admin

class CandidateInLine(admin.TabularInline):
    exclude = ('votes',)
    model = Candidate
    extra = 4
#admin.site.register(Candidate)

#class DepartmentAdmin(admin.ModelAdmin):
#    fields = ['department', 'school', 'division']
admin.site.register(Department)#, DepartmentAdmin)

class PositionAdmin(admin.ModelAdmin):
    #fields = ['election','posName','posDescription','schoolRestriction','divisionRestriction']
    inlines = [CandidateInLine]
admin.site.register(Position, PositionAdmin)
  
#class ElectionAdmin(admin.ModelAdmin):
#    fields = ['electionDescription','electionDate']
admin.site.register(Election)#, ElectionAdmin)

class ChoiceInLine(admin.TabularInline):
    #fields = ['issue','choiceDescription']
    exclude = ('votes',)
#admin.site.register(Choice, ChoiceAdmin)
    model = Choice
    extra = 3

class IssueAdmin(admin.ModelAdmin):
    #fields = ['election','issueName','issueDescription','schoolRestriction','divisionRestriction']
    inlines = [ChoiceInLine]
admin.site.register(Issue, IssueAdmin)

#class FacultyMemberAdmin(admin.ModelAdmin):
#    fields = ['bannerId', 'lastName', 'firstName', 'department']
admin.site.register(FacultyMember)
